const express = require('express')
const router = express.Router()

const User = require('../../models/User')

router.post('/', (req, res) => {
  if (req.body.username === User.username && req.body.password === User.password){
    res.json(User)
  }else{
    res.status(202).json('用户名或密码错误')
  }
})

module.exports = router